﻿using Azure;
using Bridge.Shared.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;

namespace Emails
{
    public interface ISysEmailService:IApplicationService
    {
        /// <summary>
        /// 发送邮件（多收件人）
        /// </summary>
        /// <param name="toEmails"></param>
        /// <param name="subject"></param>
        /// <param name="message"></param>
        /// <param name="attachments"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<ResponseResult> SendMultipleEmailAsync(IEnumerable<string> toEmails, string subject, string message,
    IEnumerable<Attachment> attachments = null, CancellationToken cancellationToken = default);

        /// <summary>
        /// 发送邮件
        /// </summary>
        /// <param name="toEmail"></param>
        /// <param name="subject"></param>
        /// <param name="message"></param>
        /// <param name="attachments"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<ResponseResult> SendEmailAsync(string toEmail, string subject, string message, IEnumerable<Attachment> attachments = null, CancellationToken cancellationToken = default);

        /// <summary>
        /// 获取收件箱邮件列表（摘要信息）
        /// </summary>
        Task<ResponseResult<List<EmailMessageOutput>>> GetInboxMessagesAsync(int maxCount = 50);


        /// <summary>
        /// 使用POP3协议接收邮件
        /// </summary>
        Task<List<EmailMessageOutput>> GetInboxMessagesByPopAsync(int maxCount = 50);
       
    }
}
